/**
 * @ClassName LC1346
 * @Author ykx
 * @Date 2024/7/6 22:46
 * @Version 1.0
 */
public class LC1346 {

    public static void main(String[] args) {
        LC1346 lc1346 = new LC1346();
        System.out.println(lc1346.checkIfExist(new int[]{4, -7, 11, 4, 18}));
    }

    public boolean checkIfExist(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            for (int j = i + 1; j < arr.length; j++) {
                if (isDouble(arr[i], arr[j])) {
                    return true;
                }
            }
        }
        return false;
    }

    public boolean isDouble(int num1, int num2) {
        if (num1 == 0 && num2 == 0) {
            return true;
        }
        return num1 * 1.0 / num2 == 2 || num1 * 1.0 / num2 == 0.5;
    }

}
